package com.antdesignbackend.backend.common.http;

import org.apache.http.Header;

import java.util.Map;

/**
 * 结果解析
 */
public class HttpClientResult {
    private Integer code;
    private String content;
    private Header[] cookies;
    private Map<String, String> allCookies;
    private byte[] inputStreamContent;

    private String phone;
    private String location;

    public HttpClientResult(Integer code, String content, Header[] cookies, String location) {
        this.code = code;
        this.content = content;
        this.cookies = cookies;
        this.location = location;
    }

    public HttpClientResult(Integer code, String content, Header[] cookies) {
        this.code = code;
        this.content = content;
        this.cookies = cookies;
    }

    public HttpClientResult(Integer code, byte[] inputStreamContent, Header[] cookies) {
        this.code = code;
        this.inputStreamContent = inputStreamContent;
        this.cookies = cookies;
    }

    public HttpClientResult(Integer code, String content) {
        this.code = code;
        this.content = content;
    }


    public HttpClientResult(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "HttpClientResult{" +
                "code=" + code +
                ", content='" + content + '\'' +
                '}';
    }

    public Header[] getCookies() {
        return cookies;
    }

    public void setCookies(Header[] cookies) {
        this.cookies = cookies;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Map<String, String> getAllCookies() {
        return allCookies;
    }

    public void setAllCookies(Map<String, String> allCookies) {
        this.allCookies = allCookies;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public byte[] getInputStreamContent() {
        return inputStreamContent;
    }

    public void setInputStreamContent(byte[] inputStreamContent) {
        this.inputStreamContent = inputStreamContent;
    }
}
